package models

import (
	"time"
)

type Order struct {
	Id int64 `xorm:"oid"`

	Orderguid                               string    `json:"OrderGuid" xorm:"not null UUID"`
	Storeid                                 int       `json:"StoreId" xorm:"not null INTEGER"`
	Customerid                              int       `json:"CustomerId" xorm:"not null INTEGER"`
	Billingaddressid                        int       `json:"BillingAddressId" xorm:"not null INTEGER"`
	Shippingaddressid                       int       `json:"ShippingAddressId" xorm:"INTEGER"`
	Pickupinstore                           int       `json:"PickUpInStore" xorm:"not null BIT(1)"`
	Orderstatusid                           int       `json:"OrderStatusId" xorm:"not null INTEGER"`
	Shippingstatusid                        int       `json:"ShippingStatusId" xorm:"not null INTEGER"`
	Paymentstatusid                         int       `json:"PaymentStatusId" xorm:"not null INTEGER"`
	Paymentmethodsystemname                 string    `json:"PaymentMethodSystemName" xorm:"VARCHAR"`
	Customercurrencycode                    string    `json:"CustomerCurrencyCode" xorm:"VARCHAR"`
	Currencyrate                            string    `json:"CurrencyRate" xorm:"not null NUMERIC"`
	Customertaxdisplaytypeid                int       `json:"CustomerTaxDisplayTypeId" xorm:"not null INTEGER"`
	Vatnumber                               string    `json:"VatNumber" xorm:"VARCHAR"`
	Ordersubtotalincltax                    string    `json:"OrderSubtotalInclTax" xorm:"not null NUMERIC"`
	Ordersubtotalexcltax                    string    `json:"OrderSubtotalExclTax" xorm:"not null NUMERIC"`
	Ordersubtotaldiscountincltax            string    `json:"OrderSubTotalDiscountInclTax" xorm:"not null NUMERIC"`
	Ordersubtotaldiscountexcltax            string    `json:"OrderSubTotalDiscountExclTax" xorm:"not null NUMERIC"`
	Ordershippingincltax                    string    `json:"OrderShippingInclTax" xorm:"not null NUMERIC"`
	Ordershippingexcltax                    string    `json:"OrderShippingExclTax" xorm:"not null NUMERIC"`
	Paymentmethodadditionalfeeincltax       string    `json:"PaymentMethodAdditionalFeeInclTax" xorm:"not null NUMERIC"`
	Paymentmethodadditionalfeeexcltax       string    `json:"PaymentMethodAdditionalFeeExclTax" xorm:"not null NUMERIC"`
	Taxrates                                string    `json:"TaxRates" xorm:"VARCHAR"`
	Ordertax                                string    `json:"OrderTax" xorm:"not null NUMERIC"`
	Orderdiscount                           string    `json:"OrderDiscount" xorm:"not null NUMERIC"`
	Ordertotal                              string    `json:"OrderTotal" xorm:"not null NUMERIC"`
	Refundedamount                          string    `json:"RefundedAmount" xorm:"not null NUMERIC"`
	Rewardpointswereadded                   int       `json:"RewardPointsWereAdded" xorm:"not null BIT(1)"`
	Checkoutattributedescription            string    `json:"CheckoutAttributeDescription" xorm:"VARCHAR"`
	Checkoutattributesxml                   string    `json:"CheckoutAttributesXml" xorm:"VARCHAR"`
	Customerlanguageid                      int       `json:"CustomerLanguageId" xorm:"not null INTEGER"`
	Affiliateid                             int       `json:"AffiliateId" xorm:"not null INTEGER"`
	Customerip                              string    `json:"CustomerIp" xorm:"VARCHAR"`
	Allowstoringcreditcardnumber            int       `json:"AllowStoringCreditCardNumber" xorm:"not null BIT(1)"`
	Cardtype                                string    `json:"CardType" xorm:"VARCHAR"`
	Cardname                                string    `json:"CardName" xorm:"VARCHAR"`
	Cardnumber                              string    `json:"CardNumber" xorm:"VARCHAR"`
	Maskedcreditcardnumber                  string    `json:"MaskedCreditCardNumber" xorm:"VARCHAR"`
	Cardcvv2                                string    `json:"CardCvv2" xorm:"VARCHAR"`
	Cardexpirationmonth                     string    `json:"CardExpirationMonth" xorm:"VARCHAR"`
	Cardexpirationyear                      string    `json:"CardExpirationYear" xorm:"VARCHAR"`
	Authorizationtransactionid              string    `json:"AuthorizationTransactionId" xorm:"VARCHAR"`
	Authorizationtransactioncode            string    `json:"AuthorizationTransactionCode" xorm:"VARCHAR"`
	Authorizationtransactionresult          string    `json:"AuthorizationTransactionResult" xorm:"VARCHAR"`
	Capturetransactionid                    string    `json:"CaptureTransactionId" xorm:"VARCHAR"`
	Capturetransactionresult                string    `json:"CaptureTransactionResult" xorm:"VARCHAR"`
	Subscriptiontransactionid               string    `json:"SubscriptionTransactionId" xorm:"VARCHAR"`
	Paiddateutc                             time.Time `json:"PaidDateUtc" xorm:"DATETIME"`
	Shippingmethod                          string    `json:"ShippingMethod" xorm:"VARCHAR"`
	Shippingratecomputationmethodsystemname string    `json:"ShippingRateComputationMethodSystemName" xorm:"VARCHAR"`
	Customvaluesxml                         string    `json:"CustomValuesXml" xorm:"VARCHAR"`
	Deleted                                 int       `json:"Deleted" xorm:"not null BIT(1)"`
	Createdonutc                            time.Time `json:"CreatedOnUtc" xorm:"not null DATETIME"`
}
